package com.hofon.medical.service.impl;


import java.util.List;

import javax.annotation.Resource;

import com.hofon.medical.model.PeopleInfo;
import com.hofon.medical.model.PeopleInfoCriteria;
import com.hofon.medical.provider.dao.PeopleInfoDao;
import com.hofon.medical.service.TestService;

  
/**        
 * Title: TestServiceImpl.java    
 * Description: TODO
 * @author wangyuquan       
 * @created 2015-5-13 下午2:25:00    
 */      
public class TestServiceImpl implements TestService{

	@Resource
	private PeopleInfoDao peopleInfoDao;
	
	
	
	/**
     * @discription TODO
     * @author wangyuquan       
     * @created 2015-5-13 下午2:25:19      
     * @param info
     * @return     
	 */
	@Override
	public String getPeople(PeopleInfo info) {
		PeopleInfoCriteria c = new PeopleInfoCriteria();
		PeopleInfoCriteria.Criteria cri = c.createCriteria();
	    cri.andAgeEqualTo(18);    
		List<PeopleInfo> list = peopleInfoDao.selectByCriteria(c);
		String res = "";
		if(list.size()>0){
			res = list.get(0).getName();
			
		}
		return res;
	}

}
